var host = "http://www.teampler.com";
var static_image ="https://teampler-static-contents/s3-ap-northeast-1.amazonaws.com";
var write_box; //글쓰기 박스 DOM객체
var reply_wirte_box; //댓글스기 박스 DOM객체

/**
 * 키 이벤트시 입력된 키의 코드를 반환 
 * @param event key event
 * @returns 입력된 키 코드 
 */
function getKeyCode(event){
	if(event.keyCode){
		return event.keyCode;
	}else{
		return event.which;
	}
}

/**
 * 이벤트시 타겟 반환
 * @param event
 * @returns 타겟 반환 
 */
function getTarget(event){
	var target;
	if(event == null){
		target = null;
	}
	else if(event.currentTarget){
		target = event.currentTarget;
	}else{
		target = event.srcElement;		
	}
	return $(target);
}	

/**
 * 브라우져 타입을 반환
 * @returns {String}
 */
function getBrowserType()
{
 var browserType = "";
 if(navigator.userAgent.indexOf("MSIE") != -1)
 {
	 if(navigator.userAgent.indexOf("MSIE 9") != -1)
		 return "IE9";
	 else{
		 browserType = "IE";
		 return browserType;
	 }
 }
 if(navigator.userAgent.indexOf("Firefox") != -1)
 {
  browserType = "FF";
  return browserType;
 }
 if(navigator.userAgent.indexOf("Mozilla") != -1)
 {
  browserType = "MZ";
  return browserType;
 }
 if(navigator.userAgent.indexOf("Opera") != -1)
 {
  browserType = "OP";
  return browserType;
 }
 if(navigator.userAgent.indexOf("Safari") != -1)
 {
  browserType = "SF";
  return browserType;
 }
 if(navigator.userAgent.indexOf("Mac") != -1)
 {
  browserType = "MC";
  return browserType;
 }
 browserType = "NG";
 return browserType;
}